<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: patch-howto.html,v 1.1 2002/06/06 03:11:55 wcc Exp $ -->

<html>
  <head>
    <title>Eggdrop Documentation: Patch Howto</title>
  </head>

  <body>
    <div align="center">
      <p><strong>Patch Howto</strong></p>
    </div>
    <hr>

    <p>The purpose of this document is to show you what a botnet is and how
    it could be useful to you. It also covers botflags userfile sharing.</p>
    <hr>

    <p><strong>Contents</strong></p>

    <blockquote>
      <ol>
        <li><a href="#sect1">Terms</a></li>

        <li><a href="#sect2">Applying a patch</a></li>

        <li><a href="#sect3">Creating and submitting a patch</a></li>

        <li><a href="#sect4">Downloading a patch</a></li>
      </ol>
    </blockquote>
    <hr>

    <p><a name="sect1"></a><strong>Terms</strong></p>

    <blockquote>
      <p>The following are some common terms used in this document:</p>

      <dl>
        <dt><strong>Patch</strong></dt>

        <dd>
          <p>A patch is an update to the sourcecode of a program (here
          Eggdrop). Be careful, every patch is designed for a special
          Eggdrop version and cannot be applied on every bot!</p>
        </dd>
      </dl>
    </blockquote>

    <p><a name="sect2"></a><strong>Applying a patch</strong></p>

    <p>To apply a patch to an Eggdrop, you have to first obtain the Eggdrop
    sourcecode. You should always keep a tar.gz archive with the source of
    your current Eggdrop on your shell. In the next step, you have to change
    to your source directory (i.e.: /home/user/eggdrop1.6.0/) and type
    the following command:</p>

    <blockquote>
      <p>patch -p1 &lt; ../path.to.the/patch</p>
    </blockquote>

    <p>Once this is complete, execute the following command:</p>

    <blockquote>
      <p>find . -name &quot;*.rej&quot; -print</p>
    </blockquote>

    <p>If it returns a list with filenames ending with .rej extension, then
    the patch didn&#39;t apply properly. Ensure that the patch is intended for
    your version and that you have the original source. You should also try
    to re-download the patch to ensure that the patch is not corrupted.</p>

    <p>If the patch applied properly, the only thing left to do is to recompile
    your Eggdrop and install the new modules and binaries.</p>

    <p><a name="sect3"></a><strong>Creating and submitting a patch</strong></p>

    <p>If you fixed a bug and/or changed something in Eggdrop&#39;s source
    code, it would be really nice to let the dev team know about it, so they
    can possibly apply it to next release of Eggdrop.</p>

    <p>There are several steps to submit a patch to the eggdev team:</p>

    <blockquote>
      <ol>
        <li>
          <p>Create a directory with original source tree and one with
          modified source tree.</p>
        </li>

        <li>
          <p>Run the following:</p>

          <blockquote>
            <p>diff -bur &lt;original source directory&gt; &lt;modified
            source directory&gt; &gt; patchname.patch</p>
          </blockquote>

          <p>If your changes created any new files, use &#39;diff -burN&#39;
          instead.</p>
        </li>

        <li>
          <p>Send an email to
          <a href="mailto:patches@eggheads.org">patches@eggheads.org</a> with
          the patch attached. The body should contain a detailed description
          of what you changed and why you changed it. Don&#39;t forget to
          include the Eggdrop version for which your patch was made. Also,
          please send a second email with same info to
          <a href="mailto:eggdev@eggheads.org">eggdev@eggheads.org</a>, this
          time without the patch attached.</p>
        </li>
      </ol>
    </blockquote>

    <p><a name="sect4"></a><strong>Downloading a patch</strong></p>


    <p>Many patches for eggdrop1.6.x can be found at the following
    location:</p>

    <blockquote>
      <p><a href="ftp://ftp.eggheads.org/pub/eggdrop/patches/1.6/">
      ftp://ftp.eggheads.org/pub/eggdrop/patches/1.6/</a></p>
    </blockquote>

    <hr>
    <p><em>Copyright &copy; 1997 Robey Pointer<br>
     Copyright &copy; 1999, 2000, 2001, 2002 <a href="http://www.eggheads.org/">
     Eggheads Development Team</a></em></p>
  </body>
</html>
